import type { App } from 'vue'

import { hasPerm,hasRole } from './permission'

// 全局注册 directive 插件.
const directive = {
  install(app: App) {
    // 使 v-hasPerm 在所有组件中都可用
    app.directive('hasPerm', hasPerm)
    app.directive('hasRole', hasRole)
  }
}

export default directive;
